home *** CD-ROM | disk | FTP | other *** search
/ UpTime Volume 2 #6 / utv2n6s2.d64 / silly snake (.txt) < prev    next >
Encoding:
Commodore BASIC  |  1988-01-01  |  9.7 KB  |  297 lines

  1. 1 if gh>2 then 20
  2. 2 ifgh<>.then14
  3. 4 diml(26):dims(16)
  4. 6 printchr$(8):printchr$(142)
  5. 8 poke53280,.:poke53281,.:print"[147][158]";:c=.
  6. 10 gosub 700
  7. 14 ifgh=.thengh=1:load"mach",8,1
  8. 16 ifgh=1thengh=2:load"ch",8,1
  9. 18 ifgh=2thengh=3:load"sprites",8,1
  10. 20 poke53280,5:poke53281,6:printchr$(142);
  11. 22 t1$="[176]":t2$="[174]":t3$="[173]":t4$="[189]":t5$="[192]":t6$="[221]"
  12. 24 s$=""
  13. 26 print"[147]"left$(s$,2)" [158]"t1$;:forx=1to36:printt5$;:next:printt2$
  14. 28 printleft$(s$,3)" [158]"t6$""t1$;:forx=1to34:printt5$;:next:printt2$;"[158]"t6$
  15. 30 forx=1to19:print" [158]"t6$""t6$spc(34)t6$"[158]"t6$:next
  16. 32 print" [158]"t6$""t3$;:forx=1to34:printt5$;:next:printt4$;"[158]"t6$
  17. 34 print" [158]"t3$;:forx=1to36:printt5$;:next:printt4$
  18. 36 print"[158]":a$=" silly  snake [146]":gosub850
  19. 38 print"[153]":a$="a george r. decker game ":gosub850
  20. 40 print:a$="(c)1988 uptime magazine ":gosub 850
  21. 52 print"                     "
  22. 54 print" f1...type a snake   [144] "
  23. 56 print" f3...blast a snake  [144] "
  24. 58 print" f5...mem snake      [144] "
  25. 60 print" f7...instructions   [144] "
  26. 61 print" f8...exit to uptime [144] "
  27. 62 print"                     [144] "
  28. 64 print"[144]                      "
  29. 66 print"press [158]+/[158]- to select skill level"
  30. 68 print"current skill level is:":sl=3:sh=10:sc=.:poke198,0
  31. 70 print"[158]"sl
  32. 72 geta$:ifa$="+"thensl=sl+1:ifsl=10thensl=1
  33. 74 ifa$="-"thensl=sl-1:ifsl=.thensl=9
  34. 76 ifa$=chr$(133)thenjk=.:hu=15:d3=1908:goto100
  35. 78 ifa$=chr$(134)thenjk=1:hu=7:d3=1908:goto100
  36. 80 ifa$=chr$(135)thenjk=2:hu=40:goto86
  37. 82 ifa$=chr$(136)then316
  38. 83 if a$="[140]" then 800
  39. 84 goto70
  40. 86 print"[147]   would you like 1, 2, 3, or 4 rows?"
  41. 88 print"          enter 1, 2, 3, or 4.":poke198,0
  42. 90 geta$:ifa$="1"thend3=1188:goto100
  43. 92 ifa$="2"thend3=1428:goto100
  44. 94 ifa$="3"thend3=1668:goto100
  45. 96 ifa$="4"thend3=1908:goto100
  46. 98 goto90
  47. 100 poke53272,(peek(53272)and240)+14:sys49152
  48. 102 gosub304
  49. 104 v=53248:poke2040,15:poke2041,14:poke2042,13
  50. 106 pokev+39,0:pokev+40,7:pokev+41,7
  51. 108 gosub300:ifjk=1then124
  52. 110 fora=1to26:l(a)=a:next
  53. 112 fora=1to7:b=int(rnd(0)*26)+1:c=int(rnd(0)*26)+1
  54. 114 d=l(b):l(b)=l(c):l(c)=d:next
  55. 116 d=1:c=1:fora=1188tod3step240:forb=.to21step7:pokea+b,l(c):pokea+b+54272,1
  56. 118 s(d)=l(c):d=d+1:c=c+1:next:next
  57. 120 ifjk=2thenforx=1tosl*1000:next
  58. 122 ifjk=2thenfora=1188tod3step240:forb=0to21step7:pokea+b,63:next:next
  59. 124 poke54283,0:pokev+21,0:poke2040,15
  60. 126 ifd3=1188thena1=int(rnd(0)*4)+1
  61. 128 ifd3=1428thena1=int(rnd(0)*8)+1
  62. 130 ifd3=1668thena1=int(rnd(0)*12)+1
  63. 132 ifd3=1908thena1=int(rnd(0)*16)+1
  64. 134 fort=1toint(rnd(0)*45)+2:poke54273,40:poke54272,200:poke54276,33
  65. 136 forx=1to20:next:poke54276,0:next
  66. 138 ifjk=1thenvt=137:hz=132:pokev+0,hz:pokev+1,vt:pokev+21,1
  67. 140 ona1goto142,144,146,148,150,152,154,156,158,160,162,164,166,168,170,172
  68. 142 g=48:h=54:goto174
  69. 144 g=105:h=54:goto174
  70. 146 g=161:h=54:goto174
  71. 148 g=217:h=54:goto174
  72. 150 g=48:h=103:goto174
  73. 152 g=105:h=103:goto174
  74. 154 g=161:h=103:goto174
  75. 156 g=217:h=103:goto174
  76. 158 g=48:h=150:goto174
  77. 160 g=105:h=150:goto174
  78. 162 g=161:h=150:goto174
  79. 164 g=217:h=150:goto174
  80. 166 g=48:h=198:goto174
  81. 168 g=105:h=198:goto174
  82. 170 g=161:h=198:goto174
  83. 172 g=217:h=198:goto174
  84. 174 pokev+4,g:pokev+5,h:pokev+21,peek(v+21)+4
  85. 176 pp=.:poke198,.:a$=""
  86. 178 ifjk=1then240
  87. 180 geta$:ifa$=""then188
  88. 182 ifa$<"a"ora$>"z"then192
  89. 184 w=asc(a$)-64:ifw=s(a1)then206
  90. 186 goto192
  91. 188 pp=pp+1:ifpp=sl*huthen192
  92. 190 goto178
  93. 192 pokev+21,0:poke53280,2:poke54273,60:poke54272,100:poke54276,17
  94. 194 foryy=1to200:next:poke54273,22:poke54272,190:foryy=1to200:next
  95. 196 poke54276,0:poke53280,7
  96. 198 sh=sh-1:gosub304:ifsh=.then216
  97. 200 ifjk=2then116
  98. 202 ifjk<>1thenifint(rnd(.)*10)=2then112
  99. 204 goto126
  100. 206 poke2042,14:gosub294:pokev+21,0:poke54280,43:poke54279,188
  101. 208 poke54283,17:forx=1to20:poke53280,1:poke53280,7:next:poke54283,0
  102. 210 poke2042,13
  103. 212 sc=sc+10:jj=jj+10:ifjj=100thenjj=.:sl=sl-1:ifsl=.thensl=1
  104. 214 gosub304:goto202
  105. 216 poke53280,.:poke53281,.
  106. 218 print"[147][129]final score                  final level"
  107. 220 print"[153]    "sc
  108. 222 print"                                 [145]"sl
  109. 224 print"":a$="game over ":gosub850
  110. 226 print"[158]     would you like to play again?"
  111. 228 print"[154]                 (y/n)
  112. 230 [153]"verify silly snake              a decker game"
  113. 232 [151]198,0
  114. 234 [161]a$:[139]a$[178]"y"[167][151]53272,21:[153]"load";:[141] 700:[137]20
  115. 236 [139]a$[178]"n"[167]800
  116. 238 [137]234
  117. 240 [158]49813
  118. 242 [145][194](14337)[137]246,250,254,258,262,268,274,280
  119. 244 [137]284
  120. 246 vt[178]vt[171]8:[139]vt[179]45[167]vt[178]vt[170]8
  121. 248 [137]284
  122. 250 vt[178]vt[170]8:[139]vt[177]230[167]vt[178]vt[171]8
  123. 252 [137]284
  124. 254 hz[178]hz[170]8:[139]hz[177]250[167]hz[178]hz[171]8
  125. 256 [137]284
  126. 258 hz[178]hz[171]8:[139]hz[179]15[167]hz[178]hz[170]8
  127. 260 [137]284
  128. 262 vt[178]vt[171]8:[139]vt[179]45[167]vt[178]vt[170]8:[137]284
  129. 264 hz[178]hz[171]8:[139]hz[179]15[167]hz[178]hz[170]8:vt[178]vt[170]8
  130. 266 [137]284
  131. 268 vt[178]vt[170]8:[139]vt[177]230[167]vt[178]vt[171]8:[137]284
  132. 270 hz[178]hz[171]8:[139]hz[179]15[167]hz[178]hz[170]8:vt[178]vt[170]8
  133. 272 [137]284
  134. 274 vt[178]vt[171]8:[139]vt[179]45[167]vt[178]vt[170]8:[137]284
  135. 276 hz[178]hz[170]8:[139]hz[177]250[167]hz[178]hz[171]8:vt[178]vt[170]8
  136. 278 [137]284
  137. 280 vt[178]vt[170]8:[139]vt[177]230[167]vt[178]vt[171]8:[137]284
  138. 282 hz[178]hz[170]8:[139]hz[177]250[167]hz[178]hz[171]8:vt[178]vt[171]8
  139. 284 [151]v[170]0,hz:[151]v[170]1,vt:[151]14339,[194](53278):[158]49911
  140. 286 [139][194](14337)[178]9[167]290
  141. 288 [137]188
  142. 290 [139][194](53278)[178]5[167]206
  143. 292 [137]192
  144. 294 v3[178]54296:w3[178]54276:a3[178]54277:h3[178]54273:l3[178]54272
  145. 296 [129]x3[178]15[164]0[169][171]1:[151]v3,x3:[151]w3,129:[151]a3,15:[151]h3,40:[151]l3,200:[130]
  146. 298 [151]w3,0:[151]a3,0
  147. 300 [151]54296,15:[151]54277,128:[151]54278,128
  148. 302 [151]54284,128:[151]54285,128:[142]
  149. 304 [153]""sl
  150. 306 [153]"print         "
  151. 308 [153]"print"sh""
  152. 310 [139]sc[177]99990[167]314
  153. 312 [153]""sc
  154. 314 [142]
  155. 316 [151]53280,6:[151]53281,6:[153]"loadprint":[153][199](14)
  156. 318 [153]"                                       "
  157. 320 [153]"      right$(NULL)(NULL)(NULL)(NULL)(NULL)len(NULL)right$(NULL)(NULL)(NULL) asc(NULL)(NULL) (NULL)right$(NULL)(NULL)(NULL) (NULL)(NULL)atn(NULL)val     stop "
  158. 322 [153]"onprint                                       stop wait"
  159. 324 [153]"  on                                      "
  160. 326 [153]"(NULL)hich (NULL)right$(NULL)(NULL)(NULL) (NULL)(NULL)atn(NULL)val game do you need"
  161. 328 [153]"instructions for?"
  162. 330 [153]"1) (NULL)(NULL)(NULL)val atn (NULL)(NULL)atn(NULL)val":[153]"2) peek(NULL)atn(NULL)(NULL) atn (NULL)(NULL)atn(NULL)val":[153]"3) (NULL)val(NULL) (NULL)(NULL)atn(NULL)val"
  163. 332 [153]"def            valnter 1, 2, or 3":[151]198,0:a$[178]""
  164. 334 [161]a$:[139]a$[178]"1"[167]342
  165. 336 [139]a$[178]"2"[167]408
  166. 338 [139]a$[178]"3"[167]464
  167. 340 [137]334
  168. 342 [153]"loadascirst select the skill level by pressing"
  169. 344 [153]"onthe + and - keys.  (NULL)he skill level"
  170. 346 [153]"number will change between 1 & 9.  (NULL)he"
  171. 348 [153]"lower the number the harder the level."
  172. 350 [153]"(NULL)ext select what game you want to play"
  173. 352 [153]"and it will then start."
  174. 354 [153]"(NULL)n the screen will be 16 bushes.  valach"
  175. 356 [153]"bush will have a letter on it.  (NULL)he"
  176. 358 [153]"object is to shoot (NULL)right$(NULL)(NULL)(NULL) (NULL)(NULL)atn(NULL)val when he"
  177. 360 [153]"pops up from behind a bush by pressing"
  178. 362 [153]"that bush's letter.  right$f you wait to"
  179. 364 [153]"long he will drop back down."
  180. 366 [141] 600
  181. 368 [153]"loadatnt the start of each game you have 10"
  182. 370 [153]"shots.  atns long as you keep hitting"
  183. 372 [153]"(NULL)right$(NULL)(NULL)(NULL) (NULL)(NULL)atn(NULL)val you won't lose any shots. "
  184. 374 [153]"right$f you miss him by pressing a wrong"
  185. 376 [153]"letter or by waiting to long you will"
  186. 378 [153]"lose one shot.  (NULL)hen all 10 shots are"
  187. 380 [153]"gone the game will end."
  188. 382 [153]"valach time you hit (NULL)right$(NULL)(NULL)(NULL) (NULL)(NULL)atn(NULL)val you will"
  189. 384 [153]"score 10 points.  ascor every 100 points"
  190. 386 [153]"you score the skill level will decrease"
  191. 388 [153]"(get harder)."
  192. 390 [153]"(NULL)he current skill level is listed after"
  193. 392 [153]"the game."
  194. 394 [141] 600
  195. 396 [153]"load(NULL)h yes, just to keep things interesting,"
  196. 398 [153]"onevery once in a while all the letters"
  197. 400 [153]"on the bushes will change so you won't"
  198. 402 [153]"get too used to them."
  199. 404 [141] 600:[153]"load";
  200. 406 [137]20
  201. 408 [153]"loadascirst select the skill level by pressing"
  202. 410 [153]"onthe + and - keys.  (NULL)he skill level"
  203. 412 [153]"number will change between 1 & 9.  (NULL)he"
  204. 414 [153]"lower the number the harder the level."
  205. 416 [153]"(NULL)ext select which game you want to play"
  206. 418 [153]"and it will start."
  207. 420 [153]"(NULL)n the screen will be 16 bushes.  (NULL)he"
  208. 422 [153]"object is to shoot (NULL)right$(NULL)(NULL)(NULL) (NULL)(NULL)atn(NULL)val when he"
  209. 424 [153]"pops up by using the joystick plugged"
  210. 426 [153]"into port two to move the crosshair "
  211. 428 [153]"over him and pressing the fire button."
  212. 430 [141] 600
  213. 432 [153]"loadatnt the start of each game you have 10"
  214. 434 [153]"shots.  atns long as you keep hitting"
  215. 436 [153]"(NULL)right$(NULL)(NULL)(NULL) (NULL)(NULL)atn(NULL)val you won't lose any shots. "
  216. 438 [153]"right$f you miss him by pressing the fire"
  217. 440 [153]"button when the crosshair isn't on him"
  218. 442 [153]"or by waiting too long you will lose one"
  219. 444 [153]"onshot.  (NULL)hen all 10 shots are gone the"
  220. 446 [153]"game will end."
  221. 448 [153]"valach time you hit (NULL)right$(NULL)(NULL)(NULL) (NULL)(NULL)atn(NULL)val you will"
  222. 450 [153]"score 10 points.  ascor every 100 points"
  223. 452 [153]"you score the skill level will decrease"
  224. 454 [153]"(get harder)."
  225. 456 [153]"(NULL)he current skill level is listed after"
  226. 458 [153]"the game."
  227. 460 [141] 600:[153]"load";
  228. 462 [137]20
  229. 464 [153]"loadascirst select the skill level by pressing"
  230. 466 [153]"onthe + and - keys.  (NULL)he skill level"
  231. 468 [153]"number will change between 1 & 9.  (NULL)he"
  232. 470 [153]"lower the number the harder the level."
  233. 472 [153]"(NULL)ext select what game you want to play"
  234. 474 [153]"and you will then be taken to the row"
  235. 476 [153]"option menu."
  236. 478 [153]"(NULL)elect 1, 2, 3, or 4 rows to use in the"
  237. 480 [153]"game.  (NULL)his controls how many rows of"
  238. 482 [153]"bushes you will have to memorize.  (NULL)he"
  239. 484 [153]"lower the number the easier the game."
  240. 486 [141] 600
  241. 488 [153]"load(NULL)n the screen will be 16 bushes. "
  242. 490 [153]"str$epending on the amount of bushes you"
  243. 492 [153]"selected, a letter will appear on some"
  244. 494 [153]"of them (if you selected 1 row then"
  245. 496 [153]"letters will appear on 4 bushes, 2 rows"
  246. 498 [153]"then letters will be on 8, 3 on 12,"
  247. 500 [153]"4 on 16).  (NULL)he letters will be displayed"
  248. 502 [153]"onfor a short period of time.  (NULL)val(NULL)(NULL)(NULL)right$(NULL)val"
  249. 504 [153]"them.  (NULL)hey will now be replaced with a"
  250. 506 [153]"question mark."
  251. 508 [141] 600
  252. 510 [153]"load(NULL)he object is to shoot (NULL)right$(NULL)(NULL)(NULL) (NULL)(NULL)atn(NULL)val"
  253. 512 [153]"when he pops up from behind a bush by "
  254. 514 [153]"pressing the letter that used to be on"
  255. 516 [153]"that bush."
  256. 518 [153]"right$f you wait to long he will drop back "
  257. 520 [153]"down, though you do have more time to"
  258. 522 [153]"make a decision then during the typing
  259. 524 print"game."
  260. 526 print"[193]t the start of each game you have 10"
  261. 528 print"shots.  [193]s long as you keep hitting"
  262. 530 print"[211][201][204][204][217] [211][206][193][203][197] you won't lose any shots. "
  263. 532 print"[201]f you miss him by pressing a wrong"
  264. 534 print"letter or by waiting to long you will"
  265. 536 print"lose one shot and all the letters will"
  266. 538 print"be shown again.  [215]hen all 10 shots are"
  267. 540 print"gone the game will end."
  268. 542 gosub 600
  269. 544 print"[147][197]ach time you hit [211][201][204][204][217] [211][206][193][203][197] you will"
  270. 546 print"score 10 points.  [198]or every 100 points"
  271. 548 print"you score the skill level will decrease"
  272. 550 print"(get harder)."
  273. 552 print"[212]he current skill level is listed after"
  274. 554 print"the game."
  275. 556 print"[207]h yes, just to keep things interesting"
  276. 558 print"every once in a while all the letters"
  277. 560 print"on the bushes will change so you won't"
  278. 562 print"get too used to them."
  279. 564 gosub 600:print"[147]";
  280. 566 goto20
  281. 600 print""tab(7)"[208]ress [211]pacebar to [195]ontinue"
  282. 610 poke 198,0
  283. 620 get a$:if a$<>" " then 620
  284. 630 return
  285. 700 for c=1 to 24:print"[158]silly snake   silly snake  [159] silly snake  ";:next
  286. 710 print"[158]silly snake   s[145]":poke 56295,1:poke2023,9
  287. 715 print"[145][151]published by softdisk publishing, inc.[145]"
  288. 720 fory=54272to54296:pokey,.:next
  289. 730 return
  290. 800 sys 8*4096+4
  291. 850 a=len(a$)
  292. 860 for i=1 to a/2
  293. 870 printtab(20-i);left$(a$,i);right$(a$,i)
  294. 880 print"[145]";
  295. 890 forzz=1to10:next
  296. 899 next:return
  297.